import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        //循环语句
       /* int a=1;
        int num=0;
        while (a<=100){
            num+=a;
            a++;
        }
        System.out.println(num);*/

        //计算5的阶乘
     /*   int i=1;
        int ret=1;
        while (i<=5){
            ret*=i;
            i++;
        }
        System.out.println(ret);*/
        //计算1-5的阶乘和
        int i=1;
        int num=0;
        while(i<=5){
            int a=1;
            int ret=1;
            while (a<=i){
                ret*=a;
                a++;
            }
            i++;
            num+=ret;
        }
        System.out.println(num);
    }
    public static void main4(String[] args) {
        //swutch 语句
        int a=1;
        switch (a){
            case 1:
                System.out.println("1");
                break;
            case 2:
                System.out.println("sa");
                break;
            default:
                System.out.println("输入错误");
                break;
        }
    }
    public static void main3(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int year=scanner.nextInt();

        if(year%4==0&&year%100!=0){
            System.out.println("是闰年");
        }else if(year%400==0){
            System.out.println("是闰年");
        }else{
            System.out.println("不是闰年");
        }
    }
    public static void main2(String[] args) {
        //判断一个数是正数负数还是0
        Scanner scanner=new Scanner(System.in);
        int num=scanner.nextInt();

        if(num>0){
            System.out.println("正数");
        }else if(num<0){
            System.out.println("负数");
        }else{
            System.out.println("0");
        }
    }
    public static void main1(String[] args) {
        //判断一个数是奇数还是偶数
        Scanner scanner=new Scanner(System.in);//输入数据，括号内是在键盘输入的意思
        int i=scanner.nextInt();
        if(i%2==0){
            System.out.println("偶数");
        }else {
            System.out.println("奇数");
        }



    }
}
